package com.hanserwei.han_picture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hanserwei.han_picture.domain.entity.po.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hanserwei.han_picture.domain.entity.vo.LoginUserVO;
import com.hanserwei.han_picture.domain.entity.vo.UserVO;
import com.hanserwei.han_picture.domain.request.user.UserAddRequest;
import com.hanserwei.han_picture.domain.request.user.UserQueryRequest;
import com.hanserwei.han_picture.domain.request.user.UserUpdateRequest;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

public interface UserService extends IService<User>{


    long userRegister(String userAccount, String userPassword, String checkPassword);

    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    LoginUserVO getLoginUserVO(User user);

    User getLoginUser(HttpServletRequest request);

    boolean userLogOut(HttpServletRequest request);

    long addUser(UserAddRequest userAddRequest);

    boolean deleteUser(Long id);

    List<UserVO> getUserVOList(List<User> userList);

    String encryptPassword(String password);

    boolean updateUser(UserUpdateRequest userUpdateRequest);

    User getUserById(Long id);

    UserVO getUserVO(User user);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest queryRequest);

    Page<UserVO> getUserList(UserQueryRequest queryRequest);

    boolean isAdmin(User user);
}
